﻿namespace Microsoft.Goldenlight.Framework
{
    /// <summary>
    /// 	Supports cloning, which creates a new instance of a class with the same value as an existing instance.
    /// </summary>
    public interface ICloneable
    {
        /// <summary>
        /// 	Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns> A new object that is a copy of this instance. </returns>
        LifetimeObject Clone();

        /// <summary>
        /// 	Called by Clone. Objects need to implement this method to copy all public properties not marked with TorqueCloneIgnore attribute.
        /// </summary>
        /// <param name="newLifetimeObject"> The object to be copied over. </param>
        void CopyTo(LifetimeObject newLifetimeObject);
    }
}